function foo<T, E, O>(arg1: T, arg22: E, arg3?: O, ...args: T[]) {

}

foo<number, string, boolean>(20, 'abc', true, 1, 2,3)